package com.vt.admin.api.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 系统社交登录账号表
 *
 * @author pigx code generator
 * @date 2018-08-16 21:30:41
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("sys_social_details")
@Accessors(chain = true)
public class SysSocialDetails extends Model<SysSocialDetails> {
    private static final long serialVersionUID = 20170827331L;

    @TableId(value = "id", type = IdType.ID_WORKER_STR)
    private Integer id;
    /**
     * 类型
     */
    @NotBlank(message = "类型不能为空")
    private String type;
    /**
     * 描述
     */
    private String remark;

    private String client;
    /**
     * appid
     */
    @NotBlank(message = "账号不能为空")
    private String appId;
    /**
     * app_secret
     */
    @NotBlank(message = "密钥不能为空")
    private String appSecret;
    /**
     * 回调地址
     */
    private String redirectUrl;

    private LocalDateTime createTime;

    private LocalDateTime updateTime;

    @TableLogic
    private String status;

    /**
     * 主键值
     */
    @Override
    protected Serializable pkVal() {
        return this.id;
    }
}
